package com.baijia.jigou.po;

import java.io.Serializable;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

public class OptObj implements Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = 118208877492313537L;
    private Long opt_id;
    private Integer opt_role;
    private Integer opt_sys;

    public Long getOpt_id() {
        return opt_id;
    }

    public void setOpt_id(Long opt_id) {
        this.opt_id = opt_id;
    }

    public Integer getOpt_role() {
        return opt_role;
    }

    public void setOpt_role(Integer opt_role) {
        this.opt_role = opt_role;
    }

    public Integer getOpt_sys() {
        return opt_sys;
    }

    public void setOpt_sys(Integer opt_sys) {
        this.opt_sys = opt_sys;
    }
    
    public boolean isValidate(){
        if(opt_id == null){
            return false;
        }
        if(opt_sys == null){
            return false;
        }
        return true;
    }
    
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
    }

    @Override
    public int hashCode() {
        return HashCodeBuilder.reflectionHashCode(this);
    }

    @Override
    public boolean equals(Object obj) {
        return EqualsBuilder.reflectionEquals(this, obj);
    }
}
